var isLocal = process.argv.splice(2);
if(isLocal == "local"&&isLocal){
	process.env.server = "local" // 本地环境
}
console.log("参数为："+ isLocal +"启动环境为"+process.env.server)
var express = require('express')
var path = require('path')
var session = require('express-session');
var app = express()
var setInterFace = require( './server/index')
app.use(express.static(path.join(__dirname, 'dist'))); // 使用静态文件位置
app.set('trust proxy', 1) // trust first proxy
app.use(session({
  secret: 'keyboard cat',
  resave: false,
  saveUninitialized: true,
  cookie: { secure: true }
}))
setInterFace(app)
var server = app.listen(process.env.PORT || 8072)
console.log(8072)
